package graphs;

//import org.apache.log4j.*;
import java.util.logging.Logger;

public class TestDijkstra {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
        GraphNode A = new GraphNode("A");
        GraphNode B = new GraphNode("B");
        GraphNode C = new GraphNode("C");
        GraphNode D = new GraphNode("D");
        GraphNode E = new GraphNode("E");

        //---------------------------------------------
        //
        //---------------------------------------------
        A.AddOutgoingEdge(B, 5);
        A.AddOutgoingEdge(C, 20);
        B.AddOutgoingEdge(D, 1);
        C.AddOutgoingEdge(D, 3);
        C.AddOutgoingEdge(E, 1);
        D.AddOutgoingEdge(E, 100);

        //---------------------------------------------
        //
        //---------------------------------------------
        Graph myGraph = new Graph(A);
        Dijkstra dAlg = new Dijkstra(myGraph);
        dAlg.PrintStatusOfPriorityQ();
        dAlg.go();
        dAlg.PrintStatusOfPriorityQ();


        p("done");
        myGraph.print();
    }

    private static void p(String s) {
        System.out.println(s);
    }
}